package com.choosefine.it.common.enums;

/**
 * @author 潘钱钦 2017下午3:27:56
 */
public class GetSmsTemplateCode {
	public static String getInstance(String templateName) {
		SmsTemplateEnums[] allTemplateName = SmsTemplateEnums.values();
		for (SmsTemplateEnums st : allTemplateName) {
			if (st.getTemplateName().equalsIgnoreCase(templateName)) {
				return st.getTemplateCode();
			}
		}
		throw new IllegalArgumentException("templateName值非法，没有符合该模板名称的枚举对象");
	}
}
